{php $GuestBookType=$EXT['guestbook_type']}
{php $records2=explode('|', trim($GuestBookType))}
{if $records2}
<div class="infomin01 item-top">
	<div class="boxtitle clearfix">
		<div class="scroll0{$objectcount} menu">
			<table align="center">
				<tbody>
					<tr>
						{loop $records2 $k $r2}
						<td><span{if $k==0} class="active"{/if}>{strip_tags($r2)}</span></td>
						{/loop}
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div class="box01 boxborder clearfix" style="min-height:<?php echo (181+$printinfocount*60+$addheight)?>px;">
		{loop $records2 $k $r2}
		<div class="scroll0{$objectcount}content clearfix{if $k>0} noactive{/if}">
			{php $records1=tag("table=guestbook&condition=title LIKE '[".$r2."]%' and reply!='' and status=3&pagesize=1&order=addtime desc,itemid&template=null");}
			{if $records1}
			<p><font>[咨询]</font> {strip_tags($records1[0][content])}</p>
			<p><font>[解答]</font> {strip_tags($records1[0][reply])}</p>
				{php $records1=tag("table=guestbook&condition=title LIKE '[".$r2."]%' and itemid<>".$records1[0][itemid]." and status=3&pagesize=".$printinfocount."&order=addtime desc,itemid&template=null");}
			{else}
				{php $records1=tag("table=guestbook&condition=title LIKE '[".$r2."]%' and status=3&pagesize=".($printinfocount+2)."&order=addtime desc,itemid&template=null");}
			{/if}
			{loop $records1 $r1}
			<span class="texttitle" title="{strip_tags($r1[title])}"><i class="fa fa-certificate"></i> {strip_tags($r1[title])}</span>
			<dl>
				<dt>{timetodate($r1[addtime], 5)}</dt>
				<dd>{if $r1[reply]}<font>[已解答]</font>{else}[待解答]{/if}</dd>
			</dl>
			{/loop}
		</div>
		{/loop}
		<div class="clearfix butbox">
			<a class="btn btn-info btn-sm" href="{DT_PATH}guestbook/">我有问题要咨询</a>
		</div>
	</div>
</div>
<script language="javascript">
function scroll0{$objectcount}_start(){
	var scroll0{$objectcount}=new IScroll(".scroll0{$objectcount}",{scrollX:true,scrollY:false,freeScroll:true,mouseWheel:true,click:true});
}
$(document).ready(function (){
	setTimeout("scroll0{$objectcount}_start()",2000);
	$(".scroll0{$objectcount} span").click(function () {
		var id = $(".scroll0{$objectcount} span").index(this);
		$(".scroll0{$objectcount} span").removeClass("active").eq(id).addClass("active");
		$(".scroll0{$objectcount++}content").hide().eq(id).show();
	});
})
</script>
{/if}